import { createRouter, createWebHashHistory, createWebHistory } from "vue-router";


const routes = [
    {
        path: '/',
        name: 'home',
        component: () => import("@/views/Home.vue"),
        meta:{ title:"首 页" ,icon:"HomeFilled",show:true,useFrame:true}
    },
    {
        path: '/category',
        name: 'category',
        component: () => import("@/views/category/Index.vue"),
        meta:{ title:"品类管理" ,icon:"OfficeBuilding",show:true,useFrame:true},
        children: [   
            {
                path: '/category/add',
                name: 'category-add',
                component: () => import("@/views/category/Add.vue"),
                meta:{ title:"添加品类",icon:"Plus" ,show:true,useFrame:true},
             },
            {
               path: "/category/list",
               name: 'category-list',
               component: () => import("@/views/category/List.vue"),
               meta:{ title:"品类列表",icon:"Guide",show:true ,useFrame:true},
            },
            {
                path: "/category/edit",
                name: 'category-edit',
                component: () => import("@/views/category/Edit.vue"),
                meta: { title: "品类修改", icon: "Guide", show: false, useFrame: true },
            },
       
      
        ]
    },
    {
        path: '/product',
        name: 'product',
        component: () => import("@/views/product/Index.vue"),
        meta:{ title:"商品管理" ,icon:"OfficeBuilding",show:true,useFrame:true},
        children: [   
            {
                path: '/product/add',
                name: 'product-add',
                component: () => import("@/views/product/Add.vue"),
                meta:{ title:"添加商品",icon:"LocationFilled" ,show:true,useFrame:true},
             },
            {
                path: '/product/edit',
                name: 'product-edit',
                component: () => import("@/views/product/Edit.vue"),
                meta: { title: "修改商品", icon: "LocationFilled", show: false, useFrame: true },
            },
            {
               path: "/product/list",
               name: 'product-list',
               component: () => import("@/views/product/List.vue"),
               meta:{ title:"商品列表",icon:"Guide",show:true ,useFrame:true},
            },
       
      
        ]
    },
    {
        path: '/user',
        name: 'user',
        component: () => import("@/views/user/Index.vue"),
        meta: { title: "用户管理", icon: "OfficeBuilding", show: true, useFrame: true },
        children: [
            {
                path: '/user/list',
                name: 'user-list',
                component: () => import("@/views/user/List.vue"),
                meta: { title: "用户列表", icon: "LocationFilled", show: true, useFrame: true },
            },
        ]
    },
  
  
]


const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router